<div id="message-list">
  <div id="message-main" class="message-main">
    <div id="message-container" class="message-container">
      <div class="read-sift" read-status-switch on-label="已发送" off-label="收件箱" read-condition="isSent"></div>

      <table class="message-table" valign="middle">
        <tbody>
          <tr class="row" ng-repeat="message in messageShowList" ng-switch on="isSent" ng-hide="loading">

            <td class="col col-sm-1 first-col">
              <img ng-switch-when="false" ng-src="img/userHeadImage/{{message.sender_head_image}}" alt="sender head"/>
              <img ng-switch-when="true" ng-src="img/userHeadImage/{{message.receiver_head_image}}" alt="receiver head"/>
            </td>
            <td class="col col-sm-2 second-col">
              <a class="username" ng-switch-when="false" ng-bind="message.sender_username"></a>
              <a class="username" ng-switch-when="true" ng-bind="message.receiver_username"></a>
              <p class="date" ng-bind="message.created_at"></p>
            </td>
            <td class="col col-sm-8 third-col">
              <p class="title" ng-click="goToShow(message)" >{{message.title}}</p>

              <div class="content-box">
                <div markdown-extractor bind-content="message.content"></div>
              </div>

            </td>
            <td class="col col-sm-1">
              <i class="fa fa-envelope read-image" ng-hide="isSent || message.read"></i>
            </td>
          </tr>

        </tbody>

      </table>

      <div ng-show="loading" class="row">
        <center style="margin-top: 4em"><img src="image/loading.gif" alt="加载中..."/></center>

      </div>

      <pagination total-items="pagination.totalItems" ng-model="pagination.currentPage" items-per-page="pagination.itemsPerPage"
        boundary-links="true" direction-links="false" first-text="首页" last-text="尾页"
        ng-change="getCurPageMessage()" ng-show="!pagination.isLessPerItem()"></pagination>


    </div>
  </div>
</div>

